#include <unordered_map>
template  <typename T, typename N >
class BIContainer {
public:

	std::unordered_map<T, N> T2N;
	std::unordered_map<N, T> N2T;
	void insert(T t, N n) {
		T2N[t] = n;
		N2T[n] = t;
	}
	void insert(N n, T t) {
		N2T[n] = t;
		T2N[t] = n;
	}
	N &operator [](T t) {
		return T2N[t];
	}

	T& operator [](N n) {
		return N2T[n];
	}
};





int main() {

	BIContainer<string, int> bi_container;
	bi_container.insert("123", 3);
	//bi_container.insert(3 ,"123");
	string cstr =  bi_container[3];
	cout << bi_container["123"];
}